using System;
using System.Collections;
using BMCommon;
using UnityEngine;

public class AnimateBlink : MonoBehaviour
{
	private void OnEnable()
	{
		base.StartCoroutine("CoAnimateBlink");
	}

	private void OnDisable()
	{
		base.StopCoroutine("CoAnimateBlink");
	}

	private IEnumerator CoAnimateBlink()
	{
		for (;;)
		{
			float delay = UnityEngine.Random.Range(this.delayMin, this.delayMax);
			yield return new WaitForSeconds(delay);
			base.gameObject.Blink2(1, this.freq, 1f);
			yield return new WaitForSeconds(this.freq);
		}
		yield break;
	}

	public float freq = 2f;

	public float delayMin;

	public float delayMax = 2f;
}
